import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter);

const router = new VueRouter({
    routes: [
        {
            path: "/",
            redirect: "/one2Many"
        },
        {
            path: '/webRtcAPI',
            name: 'WebRtcAPI',
            component: () => import('../views/WebRtcAPI')
        },
        {
            path: '/one2One',
            name: 'One2One',
            component: () => import('../views/One2One')
        },
        {
            path: '/one2Many',
            name: 'One2Many',
            component: () => import('../views/One2Many')
        }
    ]
});

router.afterEach( to =>{
    document.title = to.meta.title || 'WebRTC'
});
export default router;